
const minxyAttr = {
	d: {
		attr: 'display',
		n: 'none',
		b: 'block',
		i: 'inline',
		ib: 'inline-block'
	}
}

let Re = /(d)(f|n|b|ib|i|g)/g

const mAttr = (str)=>{
	let arrClass = str.match(Re)
	if (arrClass === null) return ''
	return arrClass.join('\n').replace(Re, ($0,$1,$2)=>{
		let AT = minxyAttr[$1]
		return `.${$0}{${AT.attr}:${AT[$2]};}`
	})
}

module.exports = mAttr